<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>分配班级</title>
	<layuicss/>
	<link rel="stylesheet" href="__PUBLIC__/static/css/global.css" media="all">
	<style type="text/css">
		.layui-unselect{
			height: 30px;
			line-height: 30px;
			width: 100px;
		}
		.site-table tbody tr td {text-align: center;}
		.site-table tbody tr td .layui-btn+.layui-btn{margin-left: 0px;}
		.admin-table-page {position: fixed;z-index: 19940201;bottom: 0;width: 100%;background-color: #eee;border-bottom: 1px solid #ddd;left: 0px;}
		.admin-table-page .page{padding-left:20px;}
		.admin-table-page .page .layui-laypage {margin: 6px 0 0 0;}
		.table-hover tbody tr:hover{ background-color: #EEEEEE; }
	</style>
</head>
<body>
		
	<div class="admin-main">
		<blockquote class="layui-elem-quote">
			<a href="#" class="layui-btn layui-btn-small add">
				<i class="layui-icon">&#xe608;</i> 添加使用班级
			</a>
		</blockquote>

		<fieldset class="layui-elem-field">
				<legend>使用班级详情</legend>
				<div class="layui-field-box">
					<table class="site-table table-hover">
						<thead>
							<tr>
								<th>班级名称</th>
								<th>开始时间</th>
								<th>结束时间</th>
								<th>备注</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<volist name="courseClassList" id="vo">
							<tr>
								<td>{$vo.name}</td>
								<td>{$vo.start_time}</td>
								<td>{$vo.end_time}</td>
								<td>
									<if condition="(strtotime($vo['end_time']) gt $ptime ) AND (strtotime($vo['start_time']) lt $ptime)">
										<span class="layui-btn layui-btn-mini">考试中</span>
									<elseif condition="strtotime($vo['start_time']) gt $ptime"/>
										<span class="layui-btn layui-btn-danger layui-btn-mini">未开考</span>
									<elseif condition="strtotime($vo['end_time']) lt $ptime"/>
										<span class="layui-btn layui-btn-primary layui-btn-mini">已结束</span>
									</if>
								</td>
								<td>
									<if condition="(strtotime($vo['end_time']) gt $ptime ) AND (strtotime($vo['start_time']) lt $ptime)">
										<span class="layui-btn layui-btn-mini">考试中，无法删除</span>
									<elseif condition="strtotime($vo['start_time']) gt $ptime"/>
										<a href="javascript:;" data-id="{$vo.courserclass_id}" data-opt="del" class="layui-btn layui-btn-danger layui-btn-mini del">删除</a>
									<elseif condition="strtotime($vo['end_time']) lt $ptime"/>
										<span class="layui-btn layui-btn-primary layui-btn-mini">已结束，无法删除</span>
									</if>
								</td>
							</tr>
							</volist>
						</tbody>
					</table>

				</div>
		</fieldset>
	</div>
</body>
<layuijs/>
<script type="text/javascript">
	var rooturl = "__ROOT__/";
	var testpaper_id = "{$testpaper_id}";
	var editurl = "{:U('Home/ClassPapersDetialMgr/addClassWin')}";
	var deleteurl = "{:U('Home/ClassPapersDetialMgr/deleteClass')}";
</script>
<script type="text/javascript" src="__PUBLIC__/static/js/addClass.js"></script>
</html>